<?php

require_once 'stubbed' . DIRECTORY_SEPARATOR . "Bootstrap.php";

class DefaultLoginTester extends TestRunner{
	
	private $bootstrap;
	
	public function setUp(){
		$this->bootstrap = new stubbed_Bootstrap();
		
		$dir = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'default' . DIRECTORY_SEPARATOR;
		
		require_once $dir . 'LoginController.php';
	}
	
	public function tearDown(){
		$this->bootstrap = null;
	}
	
	public function test_01_create(){
		$testObject = new LoginController();
		
		self::assertInstanceOf($testObject, "LoginController");
	}
	
	public function test_02_actionIndex(){
		$testObject = new LoginController();
		
		$testObject->setContext($context = new Mvc_Context_Controller());
		
		$context->setConfig($config = new Config());
		$config->import(APP . 'config/common.php')->import(APP . 'config/database.php');
		
		$context->setLanguage(new Language());
		
		$testObject->setLayout("default", "IndexController", "actionIndex");
		
		$actual = $testObject->actionIndex();
		self::assertEqual($actual, null);
	}
}

return new DefaultLoginTester();